      
      Ron's Week'n'ADAM

      October 29, 1997


      Forget the "Year 2000" problem; that's nothing. I have a 
      SmartBASIC 1.X problem, and it's happening right now.

      I've installed SmartBASIC 1.X on two ADAM's side by side.
The first is my original, the one with the 'heart' torn out of
it. It  has been equipped for some time with a Minnie Winnie 
harddrive, a 320k floppy, 256K memory expander, MIB2 interface, 
and Cybernex XL87D 80 column terminal. The second ADAM has a 
Micro Innovations IDE hard drive, an MIB3 Interface, 2 Orphan-
ware serial ports, a 256K memory expander and a 160K disk drive.
The serial display is a Thomson.  Both 80 column displays behave
quite well in response to Heath19 control codes. They're not an 
exact match, but they're close enough.

      But here's the problem. My original ADAM is equipped with
an Orphanware clock. The second ADAM (with the IDE drive) is
equipped with a Dynomite Sound Digitizer cartridge complete with
a clock chip. Of course SmartBASIC 1.x recognizes both, and
SmartBASIC 1.X is easily configurable. All the user has to do is 
tell the program which clock is onboard. The date and time come 
up fine on boot up. 

     The difficulty seems to happen with the day of the week. My
original ADAM thinks it's Thursday, October 29th. My second IDE 
ADAM thinks it's Friday, October 29th. 

      Of course neither ADAM is right. My calendar says, Wednes-
day October 29th, and I trust my calendar.

      You know what they say. When in doubt, read the (expletive
deleted) manual. 

      On page 13 of the SmartBASIC 1.X Manual, it says that both
time and date can be set with commands and syntax provided
expressly for the purpose. So I went there, and did that. Both 
ADAMs then agreed to stop joking about and display the correct 
day of the week.  Until I re-booted, at which point, the argue-
ment resumed.  "Thursday," says one. "No no, Friday," says the 
other.

In my heart of hearts, I still know it's Wednesday.  I just 
tried it again. Booted SmartBASIC 1.X on both machines, and 
the debate rages on. There must be an answer.

Meanwhile. We will continue with SmartBASIC 1.X, because it 
looks like fun.  Having read page 13 of Rich Drushel's 'fine' 
manual, I decided to have to fun..... not much fun, but just 
a little fun.  Here's how it turned out. 



0 REM Mighty Mitchell's BS Timer (All rights reserved)
1 REM
3 REM Screen Setup and Variable Initialization
5 REM 
6 REM x1 = start time seconds - x2 = end time seconds
7 REM m1 = start time minutes - m2 = end time minutes
8 REM h1 = start time hours - h2 = end time hours - Not used 
      here,yet!
9 REM o is a flag to indicate if a value overflow see lines 
      41 and 47   
10 TEXT31
11 INVERSE
12 ? "Mighty Mitchell's BS Timer.....":NORMAL
13 ? "Any key to repeat the program"
14 ?:? "ESC to quit"
15 x1=TIME(1): x$=TIME$: m1=TIME(2): o=0: h1=TIME(3)
16 x2=0: y$="": m2=0: h2=0: o=0
17 REM
18 REM if you're timing your speech, start talking now
19 REM   
20 LOCATE 10,1:? "Start Talking now. Press a "
21 ?:? "key when you stop."
30 GET a$
40 x2=TIME(1)
41 IF x1>x2 THEN  x2=x2+60: o=1
42 y$=TIME$: m2=TIME(2): h2=TIME(3)
44 LOCATE 14,5:? "start at ";x$
46 LOCATE 17,5:? "end   at ";y$
47 bs=(m2-m1)*60-(o=1)*60+x2-x1
48 IF bs<0 THEN CLS:? "good....you found the bug. Now fix it!":END
50 LOCATE 20,5:? "seconds elapsed = ";bs
55 GET a$:IF a$=CHR$(27) THEN END
57 GOTO 10
58 REM     
59 REM there are certain conditions under which the expression
       in line 47
60 REM does not produce the desired result. Challenge the user
       to find
61 REM them
65 REM
66 REM   
67 REM  Ron Mitchell, October 30, 1997 
69 REM    
70 REM
75 REM
80 REM It's Thursday night. The SB1.X DATEs are still 1 and 2 
85 REM days out. One now says Friday, the other says Saturday.
90 REM Bummer!
